#pragma once
#include "mat.h"
#include <stdio.h>

class MatFile
{
public:
	MatFile(void);
	~MatFile(void) ;
	int open(char* file, char* mode)
	{
		pMatFile = matOpen(file, mode);
		if (pMatFile == NULL)
		{
			printf("Error open file %s\n", file);
			return -1;
		}
		return 0;
	}
	int close(void)
	{
		if (matClose(pMatFile) != 0)
		{
			printf("Error closing file \n");
			return -1;
		}
		return 0;
	}
private:
	MATFile* pMatFile{NULL};
};

